<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../lib/layui/css/layui.css">
    <link rel="stylesheet" href="../css/art_list.css">
</head>

<body>
    <div class="layui-card">
        <div class="layui-card-header">文章列表</div>
        <div class="layui-card-body">
            <form class="layui-form" id="form-search">
                <div class="layui-form-item layui-inline">
                    <select name="cate_id">
                        <option value="">所有分类</option>
                       <script type="text/html" id="tpl-cate">
                        {{each data}}
                        <option value="{{$value.id}}">{{$value.name}}</option>{{/each}}
                    </script>
                      </select>
                </div>
                <div class="layui-form-item layui-inline">
                    <select name="state">
                        <option value="">所有状态</option>
                        <option value="010">已发布</option>
                        <option value="021">草稿</option>
                        
                      </select>
                </div>
                <div class="layui-form-item layui-inline">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                    </div>
                </div>
            </form>
            <table class="layui-table">
                <colgroup>

                    <col>
                    <col width="150">
                    <col width="150">
                    <col width="150">
                    <col width="150">

                </colgroup>
                <thead>
                    <tr>
                        <th>文章标签</th>
                        <th>分类</th>
                        <th>发表时间</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <script type="text/html" id="tpl-table">
                        {{each data}}
                        <tr>
                            <td>{{$value.title}}</td>
                            <td>{{$value.cate_name }}</td>
                            <td>{{$value.pub_date|dataFormat }}</td>
                            <td>{{$value.state }}</td>
                            <td>
                                <button type="button" class="layui-btn layui-btn-xs " id="btn-add">编辑</button>
                                <button type="button" class="layui-btn layui-btn-xs layui-btn-danger btn-delete" data-id="{{$value.Id}}">删除</button>
                            </td>
                        </tr>{{/each}}
                    </script>
                </tbody>
            </table>
            <div id="pageBox"></div>

        </div>
    </div>
    <script src="../lib/layui/layui.all.js"></script>
    <script src="../lib//template-web.js"></script>
    <script src="../js/jquery.js"></script>
    <script src="../js/art_list.js"></script>

</body>

</html>